package cn.net.withub.dataCollector.web.service;

import cn.net.withub.dataCollector.common.base.BaseManager;
import cn.net.withub.dataCollector.common.model.TCollectorData;
import java.util.List;
import java.util.Map;

/**
 * Created by yuanjie on 2018/4/27.
 */
public interface CollectorService extends BaseManager {
    /**
     * 保存对象
     *
     * @param object
     * @throws Exception
     */
    public void save(Object object) throws Exception;

    /**
     * 执行抓取
     *
     * @throws Exception
     */
    public void executeCollector() throws Exception;

    /**
     * 提取文本
     *
     * @param data
     * @throws Exception
     */
    public void extractText(TCollectorData data) throws Exception;


    /**
     * 外网文件上传到fastdfs
     *
     * @param t
     * @param <T>
     * @throws Exception
     */
    public <T> void uploadFastdfs(T t) throws Exception;

    public List<Map<String, Object>> getDataObjById(String dbTable, String where);

    /**
     * 修改图片路径
     */
    public void saveImg();

    /**
     * 更新新浪 t_collector_content 的content和text内容,去掉专题和相关新闻
     */
    public void updataContent();

}
